import { asyncRoutes } from '@/router/index'
import Router from '@/router/index'
const state = {
}
const mutations = {
}
const actions = {
  getmenus(store, data) {
    const router = asyncRoutes.filter(item => data.includes(item.name))
    Router.options.routes = [...Router.options.routes, ...router, { path: '*', redirect: '/404', hidden: true }]
    return router
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
